<template>
  <view class="button" v-if="icon" @click="click">
    <text :class="[`iconfont icon-${icon}`]"></text>
  </view>
</template>

<script>
export default {
  props: {
    icon: {
      type: String,
      default: "",
    },
  },
  methods: {
    click(index) {
      this.$emit("suspensionButtonClick");
    },
  },
};
</script>

<style lang="scss" scoped>
.button {
  width: 100rpx;
  height: 100rpx;
  border-radius: 50rpx;
  line-height: 100rpx;
  text-align: center;
  color: #ffffff;
  background: $theme-color;
  position: fixed;
  bottom: 100rpx;
  left: 325rpx;
  box-shadow: rgba(142, 142, 142, 0.6) 0 4rpx 6rpx 0;
  text {
    font-size: 80rpx;
  }
}
</style>
